package com.akcome.apollo.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.akcome.apollo.domain.VFoundBlocks;

/**
 * Repository接口
 *
 * @author wn
 * @version $v: 1.0.0, $time:2017-12-26 08:49:00 Exp $
 */
public interface VFoundBlocksRepository extends JpaRepository<VFoundBlocks,Long>,JpaSpecificationExecutor<VFoundBlocks> {

	@Query(nativeQuery=true,value="select cointype,count(*),SUM(rewards) from v_found_blocks GROUP BY cointype")
	List<Object> findGroupCoinType();
}
